package com.abou.mvc.validation.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;
import com.abou.mvc.validation.impl.MultipartValidConstraintValidator;

/**
 * The annotation used to check that a product object contains consistent
 * values.
 * 
 * @author khalid
 */

@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE,
    ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = MultipartValidConstraintValidator.class)
public @interface MultipartValid {
  
  /**
   * @return The default error message key
   */
  String message() default "{MultipartValid}";
  
  /**
   * @return The groups
   */
  Class<?>[] groups() default {};
  
  /**
   * @return The payload
   */
  Class<? extends Payload>[] payload() default {};
}
